package com.code.demo.ui.test;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.code.demo.R;
import com.code.demo.databinding.ActivityConstraintLayoutBinding;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * Created by android on 2018/11/30.
 */

public class ConstraintLayoutActivity extends AppCompatActivity {

    private ActivityConstraintLayoutBinding binding;

    @BindView(R.id.back)
    public TextView back;

    @BindView(R.id.title)
    public TextView title;

    @BindView(R.id.done)
    public TextView done;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_constraint_layout);

        ButterKnife.bind(this);

        binding.setPresenter(new Presenter());
    }

    @OnClick(R.id.back)
    public void onBack() {
        back.setVisibility(View.GONE);
    }

    @OnClick(R.id.title)
    public void onTitle() {
        back.setVisibility(View.VISIBLE);
        done.setVisibility(View.VISIBLE);
    }

    @OnClick(R.id.done)
    public void onDone() {
        done.setVisibility(View.GONE);
    }

    public class Presenter {

    }
}
